<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>后台管理系统</title>
<link rel="stylesheet" type="text/css" href="/xiaorong/resources/css/style.css" />
<script src="/xiaorong/resources/js/jquery.js"></script>
<script src="/xiaorong/resources/js/jquery.mCustomScrollbar.concat.min.js"></script>
<script type="text/javascript">
function toEdit(id){
	layer.open({
	  type: 2,
	  area: ['550px', '300px'],
	  fix: false, //不固定
	  maxmin: true,
	  content: 'edit.do?id='+id,
	  end: function(){ //此处用于演示
		  location.reload(true);
	  }
	});
}

</script>
</head>
<body>
	<!--header-->
	<jsp:include page="../common/header.jsp"></jsp:include>
	
	<section class="rt_wrap content mCustomScrollbar">
		<div class="rt_content">
			<p>&nbsp;</p>
			<div class="page_title">
				<h2 class="fl" style="margin-right:20px;">角色管理</h2>
				<a class="fr top_rt_btn checkAuth" href="javascript:toEdit('')" auth="admin:save">新增</a>
				<a class="fr top_rt_btn delete checkAuth" auth="admin:delete">删除</a>
			</div>
			<table class="table">
				<tr>
					<th style="width: 40px;"><input type="checkbox" value="-1" id="checkAll" /><label for="checkAll">全选</label></th>
					<th>行号</th>
					<th>管理员</th>
					<th>最后登录时间</th>
					<th>操作</th>
				</tr>
				<c:forEach items="${admins }" var="one" varStatus="index">
					<tr>
						<td align="center">
			        	 	<input type="checkbox" class="ids" name="id" value="${one.id}" />
			        	</td>
						<td>${index.index+1}</td>
						<td>${one.name}</td>
						<td>${one.lastLogin}</td>
						<td>
							<a class="checkAuth" href="javascript:;" onclick="toEdit(${one.id})" auth="admin:update">编辑</a>
						</td>
					</tr>
				</c:forEach>
			</table>
			<!--page nav-->
			<form id="pageForm" action="list.do">
				<jsp:include page="../common/page.jsp"></jsp:include>
			</form>
		</div>
	</section>
	<!--结束：以下内容则可删除，仅为素材引用参考-->
</body>
</html>
